package cloud.maque.admin.service;

import cloud.maque.admin.domain.entity.MqTenant;
import cloud.maque.framework.common.request.PaginateDataResquest;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

/**
 * @author 4color
 * @description 租户服务层
 * @date 2023-03-17
 */
@Service
public interface MqTenantService extends IService<MqTenant> {


    /**
     * 只做逻辑删除
     *
     * @param id
     * @return
     */
    boolean logicDeleteById(String id);

    /**
     * 插入一条记录
     *
     * @param mqRole 记录对象
     * @return 是否成功
     */
    MqTenant saveTenant(MqTenant mqRole);

    MqTenant getByCode(String tenantCode);

    /**
     * 分页查询
     *
     * @param pageReq
     * @return
     */
    PageInfo<MqTenant> page(PaginateDataResquest<MqTenant> pageReq);

    Integer getCountByComboId(String comboId);


}
